package com.lanchetech.dao;

import com.lanchetech.bean.request.PageReq;import com.lanchetech.entity.Coupon;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.Date;import java.util.List;

@Mapper
public interface CouponMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Coupon record);

    int insert2(Coupon record);

    int insertSelective(Coupon record);

    Coupon selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Coupon record);

    int updateByPrimaryKey(Coupon record);

    List<Coupon> findAllPage(PageReq req);

    List<Coupon> findTwo(PageReq req);

    int updateDeletedAndUpdatedAtById(@Param("updatedDeleted") Byte updatedDeleted, @Param("updatedUpdatedAt") Date updatedUpdatedAt, @Param("id") Long id);

    List<Coupon> findAllByIds(@Param("ids") List<Long> ids);

    int updateStockById(@Param("id") Long id);

    Coupon findOneTopCoupon();

    Coupon getBySpuId(Long id);
}